home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / AOCE / Development Tools / Interfaces / PInterfaces / OCEStandardMail.p < prev    next >
Encoding:
Text File  |  1993-11-10  |  17.5 KB  |  629 lines  |  [TEXT/MPS ]

  1. {***********************************************************
  2.  
  3. Created: Monday, November 8, 1993 12:03PM
  4.  OCEStandardMail.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.   Copyright Apple Computer, Inc. 1990-1993
  8.   All rights reserved
  9.  
  10. ***********************************************************}
  11.  
  12.  
  13. {$IFC UNDEFINED UsingIncludes}
  14. {$SETC UsingIncludes:= 0}
  15. {$ENDC}
  16.  
  17. {$IFC NOT UsingIncludes}
  18.     UNIT OCEStandardMail;
  19.     INTERFACE
  20. {$ENDC}
  21.  
  22. {$IFC UNDEFINED UsingOCEStandardMail}
  23. {$SETC UsingOCEStandardMail:= 1}
  24.  
  25. {$I+}
  26. {$SETC OCEStandardMailIncludes:= UsingIncludes}
  27. {$SETC UsingIncludes:= 1}
  28.  
  29.  
  30. {$IFC UNDEFINED UsingAppleEvents}
  31. {$I $$Shell(PInterfaces)AppleEvents.p}
  32. {$ENDC}
  33.  
  34. {$IFC UNDEFINED UsingFiles}
  35. {$I $$Shell(PInterfaces)Files.p}
  36. {$ENDC}
  37.  
  38. {$IFC UNDEFINED UsingOCEAuthDir}
  39. {$I OCEAuthDir.p}
  40. {$ENDC}
  41.  
  42. {$IFC UNDEFINED UsingOCEMail}
  43. {$I OCEMail.p}
  44. {$ENDC}
  45.  
  46. {$IFC UNDEFINED UsingWindows}
  47. {$I $$Shell(PInterfaces)Windows.p}
  48. {$ENDC}
  49.  
  50. {$IFC UNDEFINED UsingDialogs}
  51. {$I $$Shell(PInterfaces)Dialogs.p}
  52. {$ENDC}
  53.  
  54. {$SETC UsingIncludes:= OCEStandardMailIncludes}
  55.  
  56.  
  57.  
  58.  
  59. CONST
  60. gestaltSMPMailerVersion            = 'malr';
  61. gestaltSMPSPSendLetterVersion    = 'spsl';
  62.  
  63. kSMPNativeFormatName            = 'natv';
  64.  
  65. kSMPVersion = 1;
  66.  
  67. TYPE
  68. LetterSpec = RECORD
  69.     spec: ARRAY[1..3] OF LONGINT;
  70.     END;
  71.  
  72. CONST
  73. typeLetterSpec        = 'lttr';
  74.  
  75. { Wildcard used for filtering letter types. }
  76.  
  77. CONST
  78. FilterAnyLetter                =    'ltr*';
  79. FilterAppleLetterContent    =    'ltc*';
  80. FilterImageContent            =    'lti*';
  81.  
  82. TYPE
  83. LetterDescriptor = RECORD
  84.     onDisk: BOOLEAN;
  85.     CASE INTEGER OF
  86.         1:    (fileSpec: FSSpec);
  87.         2:    (mailboxSpec: LetterSpec);
  88.     END;
  89.  
  90.  
  91.  
  92. {
  93. SMPPSendAs values.  You may add the following values together to determine how the
  94. file is sent, but you may not set both kSMPSendAsEnclosureMask and kSMPSendFileOnlyMask.  This
  95. will allow you to send the letter as an image so that it will work with fax gateways
  96. and send as an enclosure as well.
  97. }
  98.  
  99. CONST
  100. kSMPSendAsEnclosureBit    = 0;            { Appears as letter with enclosures }
  101. kSMPSendFileOnlyBit        = 1;            { Appears as a file in mailbox. }
  102. kSMPSendAsImageBit        = 2;            { Content imaged in letter }
  103.  
  104.  
  105. { Values of SMPPSendAs }
  106. kSMPSendAsEnclosureMask    = $01;  {1<<kSMPSendAsEnclosureBit}
  107. kSMPSendFileOnlyMask    = $02;  {1<<kSMPSendFileOnlyBit}
  108. kSMPSendAsImageMask        = $04;  {1<<kSMPSendAsImageBit}
  109.  
  110.  
  111. TYPE
  112. SMPPSendAs = Byte;
  113.  
  114.  
  115. { Send Package Structures }
  116.  
  117. SMPDrawImageProcPtr = ProcPtr;
  118.     { FUNCTION SMPDrawImageProcPtr(refcon: LONGINT; inColor: BOOLEAN): void;}
  119.  
  120. SMPRecipientDescriptor = RECORD
  121.     next: ^SMPRecipientDescriptor;        {  Q-Link. }
  122.     result: OSErr;                        {  result code when using the object. }
  123.     recipient: ^OCEPackedRecipient;        {  Pointer to a Packed Address. }
  124.     size: LONGINT;                        {  length of recipient in bytes. }
  125.     theAddress: MailRecipient;            {  structure points into recipient and theRID. }
  126.     theRID: RecordID;                    {  structure points into recipient. }
  127.     END;
  128.  
  129. SMPRecipientDescriptorPtr = ^SMPRecipientDescriptor;
  130.  
  131. SMPEnclosureDescriptor = RECORD
  132.     next: ^SMPEnclosureDescriptor;
  133.     result: OSErr;
  134.     fileSpec: FSSpec;
  135.     fileCreator: OSType;                {  Creator of this enclosure. }
  136.     fileType: OSType;                    {  File Type of this enclosure. }
  137.     END;
  138.  
  139. SMPEnclosureDescriptorPtr = ^SMPEnclosureDescriptor;
  140.  
  141. SMPLetterPB = PACKED RECORD
  142.     result: OSErr;                        { result of operation }
  143.     subject: RStringPtr;                { RString }
  144.     senderIdentity: AuthIdentity;        { Letter is sent from this Identity }
  145.     toList: SMPRecipientDescriptorPtr;    { Pointer to linked list }
  146.     ccList: SMPRecipientDescriptorPtr;    { Pointer to linked list }
  147.     bccList: SMPRecipientDescriptorPtr;    { Pointer to linked list }
  148.     script: ScriptCode;                    { Identifier for language }
  149.     textSize: Size;                        { length of body data }
  150.     textBuffer: Ptr;                    { body of the letter }
  151.     sendAs: SMPPSendAs;                    { Send as Letter, Enclosure, Image }
  152.     padByte: Byte;
  153.     enclosures: SMPEnclosureDescriptorPtr;    { files to be enclosed }
  154.     drawImageProc: SMPDrawImageProcPtr;    { For imaging }
  155.     imageRefCon: LONGINT;                { For imaging }
  156.     supportsColor: BOOLEAN;                { For imaging - set to true if you application supports color imaging }
  157.     END;
  158.  
  159. SMPLetterPBPtr = ^SMPLetterPB;
  160.  
  161. CONST
  162. kSMPAppMustHandleEventBit = 0;
  163. kSMPAppShouldIgnoreEventBit = 1;
  164. kSMPContractedBit = 2;
  165. kSMPExpandedBit = 3;
  166. kSMPMailerBecomesTargetBit = 4;
  167. kSMPAppBecomesTargetBit = 5;
  168. kSMPCursorOverMailerBit = 6;
  169. kSMPCreateCopyWindowBit = 7;
  170. kSMPDisposeCopyWindowBit = 8;
  171. { Values of SMPMailerResult }
  172. kSMPAppMustHandleEventMask        = $00000001;    {1<<kSMPAppMustHandleEventBit}
  173. kSMPAppShouldIgnoreEventMask    = $00000002;    {1<<kSMPAppShouldIgnoreEventBit}
  174. kSMPContractedMask                = $00000004;    {1<<kSMPContractedBit}
  175. kSMPExpandedMask                = $00000008;    {1<<kSMPExpandedBit}
  176. kSMPMailerBecomesTargetMask        = $00000010;    {1<<kSMPMailerBecomesTargetBit}
  177. kSMPAppBecomesTargetMask        = $00000020;    {1<<kSMPAppBecomesTargetBit}
  178. kSMPCursorOverMailerMask        = $00000040;    {1<<kSMPCursorOverMailerBit}
  179. kSMPCreateCopyWindowMask        = $00000080;    {1<<kSMPCreateCopyWindowBit}
  180. kSMPDisposeCopyWindowMask        = $00000100;    {1<<kSMPDisposeCopyWindowBit}
  181.  
  182.  
  183. TYPE
  184. SMPMailerResult = LONGINT;
  185.  
  186. CONST
  187. { Values of SMPMailerComponent}
  188. kSMPOther            =    -1;
  189. kSMPFrom            =    32;
  190. kSMPTo                =    20;
  191. kSMPRegarding        =    22;
  192. kSMPSendDateTime    =    29;
  193. kSMPAttachments        =    26;
  194. kSMPAddressOMatic    =    16;
  195.  
  196.  
  197. TYPE
  198. SMPMailerComponent = LONGINT;
  199.  
  200.  
  201. CONST
  202. kSMPToAddress        =    kMailToBit;
  203. kSMPCCAddress        =    kMailCcBit;
  204. kSMPBCCAddress        =    kMailBccBit;
  205.  
  206.  
  207. TYPE
  208. SMPAddressType = MailAttributeID;
  209.  
  210.  
  211. CONST
  212. kSMPUndoCommand = 0;
  213. kSMPCutCommand = 1;
  214. kSMPCopyCommand = 2;
  215. kSMPPasteCommand = 3;
  216. kSMPClearCommand = 4;
  217. kSMPSelectAllCommand = 5;
  218.  
  219.  
  220. TYPE
  221. SMPEditCommand = INTEGER;
  222.  
  223. CONST
  224. kSMPUndoDisabled = 0;
  225. kSMPAppMayUndo = 1;
  226. kSMPMailerUndo = 2;
  227.  
  228.  
  229. TYPE
  230. SMPUndoState = INTEGER;
  231.  
  232.  
  233.  
  234. {
  235. SMPSendFormatMask:
  236.  
  237. Bitfield indicating which combinations of formats are included in,
  238. should be included or, or can be included in a letter.
  239. }
  240.         
  241. CONST
  242. kSMPNativeBit                = 0;
  243. kSMPImageBit                = 1;
  244. kSMPStandardInterchangeBit    = 2;
  245.  
  246. { Values of SMPSendFormatMask }
  247. CONST
  248. kSMPNativeMask                = $00000001;  {1<<kSMPNativeBit}
  249. kSMPImageMask                = $00000002;  {1<<kSMPImageBit}
  250. kSMPStandardInterchangeMask    = $00000004;  {1<<kSMPStandardInterchangeBit}
  251.  
  252. TYPE
  253. SMPSendFormatMask = LONGINT;
  254.  
  255.  
  256.  
  257. {
  258.     Pseudo-events passed to the clients filter proc for initialization and cleanup.
  259. }
  260. CONST
  261. kSMPSendOptionsStart    = -1;
  262. kSMPSendOptionsEnd        = -2;
  263.  
  264.  
  265. {
  266. SMPSendFormatMask:
  267.  
  268. Structure describing the format of a letter.  If kSMPNativeMask bit is set, the whichNativeFormat field indicates which of the client-defined formats to use.
  269. }
  270.         
  271.  
  272. TYPE SMPSendFormat = RECORD
  273.     whichFormats: SMPSendFormatMask;
  274.     whichNativeFormat: INTEGER;        { 0 based }
  275. END;
  276.  
  277. SMPLetterInfo = RECORD
  278.     letterCreator: OSType;
  279.     letterType: OSType;
  280.     subject: RString32;
  281.     sender: RString32;
  282. END;
  283.  
  284. CONST
  285. kSMPSave = 0;
  286. kSMPSaveAs = 1;
  287. kSMPSaveACopy = 2;
  288.  
  289.  
  290. TYPE
  291. SMPSaveType = INTEGER;
  292.  
  293.  
  294.  
  295. FrontWindowProcPtr = ProcPtr;
  296.     { FUNCTION FrontWindowProcPtr(clientData: LONGINT): WindowPtr;}
  297.  
  298. PrepareMailerForDrawingProcPtr = ProcPtr;
  299.     { FUNCTION PrepareMailerForDrawingProcPtr(
  300.         window: WindowPtr; clientData: LONGINT): void;}
  301.  
  302. SendOptionsFilterProc = ProcPtr;
  303.     { FUNCTION SendOptionsFilterProc(theDialog: DialogPtr; VAR theEvent: EventRecord;
  304.         itemHit: INTEGER; clientData: LONGINT): BOOLEAN;}
  305.  
  306. CONST
  307. kSMPGetDimensions            = 4700;
  308. kSMPNewMailer                = 4701;
  309. kSMPDisposeMailer            = 4702;
  310. kSMPMailerEvent                = 4703;
  311. kSMPMailerEditCommand        = 4704;
  312. kSMPMailerForward            = 4705;
  313. kSMPMailerReply                = 4706;
  314. kSMPGetMailerState            = 4707;
  315. kSMPPrepareCoverPages        = 4708;
  316. kSMPDrawNthCoverPage        = 4709;
  317. kSMPBeginSave                = 4710;
  318. kSMPBeginSend                = 4711;
  319. kSMPOpenLetter                = 4712;
  320. kSMPDrawMailer                = 4713;
  321. kSMPMoveMailer                = 4714;
  322. kSMPSetSubject                = 4715;
  323. kSMPSetFromIdentity            = 4716;
  324. kSMPAddAddress                = 4717;
  325. kSMPAddAttachment            = 4718;
  326. kSMPContentChanged            = 4719;
  327. kSMPEndSave                    = 4720;
  328. kSMPEndSend                    = 4721;
  329. kSMPExpandOrContract        = 4722;
  330. kSMPBecomeTarget            = 4723;
  331. kSMPGetTabInfo                = 4724;
  332. kSMPClearUndo                = 4725;
  333. kSMPAttachDialog            = 4726;
  334. kSMPGetComponentSize        = 4727;
  335. kSMPGetComponentInfo        = 4728;
  336. kSMPGetListItemInfo            = 4729;
  337. kSMPAddContent                = 4730;
  338. kSMPReadContent                = 4731;
  339. kSMPGetFontNameFromLetter    = 4732;
  340. kSMPAddMainEnclosure        = 4733;
  341. kSMPGetMainEnclosureFSSpec    = 4734;
  342. kSMPAddBlock                = 4735;
  343. kSMPReadBlock                = 4736;
  344. kSMPEnumerateBlocks            = 4737;
  345. kSMPImage                    = 4738;
  346. kSMPInitMailer                = 4741;
  347. kSMPGetNextLetter            = 4742;
  348. kSMPPrepareToClose            = 4743;
  349. kSMPCloseOptionsDialog        = 4744;
  350. kSMPPrepareToChange            = 4745;
  351. kSMPGetLetterInfo            = 4746;
  352. kSMPTagDialog                = 4747;
  353. kSMPSendOptionsDialog        = 5000;
  354.  
  355.  
  356. TYPE
  357. SMPMailerState = RECORD
  358.     mailerCount: INTEGER;
  359.     currentMailer: INTEGER;
  360.     upperLeft: Point;
  361.     hasBeenReceived: BOOLEAN;
  362.     isTarget: BOOLEAN;
  363.     isExpanded: BOOLEAN;
  364.     canMoveToTrash: BOOLEAN;
  365.     canTag: BOOLEAN;
  366.     {padByte2: Byte;}
  367.     changeCount: LONGINT;
  368.     targetComponent: SMPMailerComponent;
  369.     canCut: BOOLEAN;
  370.     canCopy: BOOLEAN;
  371.     canPaste: BOOLEAN;
  372.     canClear: BOOLEAN;
  373.     canSelectAll: BOOLEAN;
  374.     {padByte3: Byte;}
  375.     undoState: SMPUndoState;
  376.     undoWhat: Str63;
  377.     END;
  378.  
  379.  
  380. SMPSendOptions = RECORD
  381.     signWhenSent: BOOLEAN;
  382.     priority: IPMPriority;
  383.     END;
  384.  
  385. SMPSendOptionsPtr = ^SMPSendOptions;
  386. SMPSendOptionsHandle = ^SMPSendOptionsPtr;
  387.  
  388.  
  389. SMPCloseOptions = RECORD
  390.     moveToTrash: BOOLEAN;
  391.     addTag: BOOLEAN;
  392.     tag: RString32;
  393.     END;
  394.  
  395. SMPCloseOptionsPtr = ^SMPCloseOptions;
  396.  
  397.  
  398.  
  399. {----------------------------------------------------------------------------------------
  400.     Send Package Routines
  401. ----------------------------------------------------------------------------------------}
  402. CONST
  403. kSMPSendLetter                = 500;
  404. kSMPResolveToRecipient        = 1100;
  405.  
  406. kSMPNewPage                    = 2100;
  407. kSMPImageErr                = 2101;
  408.  
  409.  
  410.  
  411.  
  412. FUNCTION SMPSendLetter(theLetter: SMPLetterPBPtr): OSErr;
  413.     INLINE $203C, 2, kSMPSendLetter, $AA5D;
  414.  
  415. FUNCTION SMPNewPage(VAR newHeader: OpenCPicParams): OSErr;
  416.     INLINE $203C, 2, kSMPNewPage, $AA5D;
  417.  
  418. FUNCTION SMPImageErr: OSErr;
  419.     INLINE $203C, 0, kSMPImageErr, $AA5D;
  420.  
  421. FUNCTION SMPResolveToRecipient(dsSpec: PackedDSSpecPtr;
  422.     VAR recipientList: SMPRecipientDescriptorPtr; identity: AuthIdentity): OSErr;
  423.     INLINE $203C, 6, kSMPResolveToRecipient, $AA5D;
  424.  
  425.  
  426.  
  427. FUNCTION SMPInitMailer(mailerVersion: LONGINT): OSErr;
  428.     INLINE $203C, 2, kSMPInitMailer, $AA5D;
  429.  
  430. FUNCTION SMPGetDimensions(VAR width: INTEGER; VAR contractedHeight: INTEGER;
  431.     VAR expandedHeight: INTEGER): OSErr;
  432.     INLINE $203C, 6, kSMPGetDimensions, $AA5D;
  433.  
  434. FUNCTION SMPGetTabInfo(VAR firstTab: SMPMailerComponent;
  435.     VAR lastTab: SMPMailerComponent): OSErr;
  436.     INLINE $203C, 4, kSMPGetTabInfo, $AA5D;
  437.  
  438. FUNCTION SMPNewMailer(window: WindowPtr; upperLeft: Point; canContract: BOOLEAN;
  439.     initiallyExpanded: BOOLEAN; identity: AuthIdentity;
  440.     prepareMailerForDrawingCB: PrepareMailerForDrawingProcPtr;
  441.     clientData: LONGINT): OSErr;
  442.     INLINE $203C, 12, kSMPNewMailer, $AA5D;
  443.  
  444. FUNCTION SMPPrepareToClose(window: WindowPtr): OSErr;
  445.     INLINE $203C, 2, kSMPPrepareToClose, $AA5D;
  446.  
  447. FUNCTION SMPCloseOptionsDialog(window: WindowPtr; closeOptions: SMPCloseOptionsPtr): OSErr;
  448.     INLINE $203C, 4, kSMPCloseOptionsDialog, $AA5D;
  449.  
  450. FUNCTION SMPTagDialog(window: WindowPtr; theTag: RString32Ptr): OSErr;
  451.     INLINE $203C, 4, kSMPTagDialog, $AA5D;
  452.  
  453. FUNCTION SMPDisposeMailer(window: WindowPtr; closeOptions: SMPCloseOptionsPtr): OSErr;
  454.     INLINE $203C, 4, kSMPDisposeMailer, $AA5D;
  455.  
  456. FUNCTION SMPMailerEvent(event: EventRecord; VAR whatHappened: SMPMailerResult;
  457.     frontWindowCB: FrontWindowProcPtr; clientData: LONGINT): OSErr;
  458.     INLINE $203C, 8, kSMPMailerEvent, $AA5D;
  459.  
  460. FUNCTION SMPClearUndo(window: WindowPtr): OSErr;
  461.     INLINE $203C, 2, kSMPClearUndo, $AA5D;
  462.  
  463.  
  464. FUNCTION SMPMailerEditCommand(window: WindowPtr; command: SMPEditCommand;
  465.     VAR whatHappened: SMPMailerResult): OSErr;
  466.     INLINE $203C, 5, kSMPMailerEditCommand, $AA5D;
  467.  
  468. FUNCTION SMPMailerForward(window: WindowPtr; from: AuthIdentity): OSErr;
  469.     INLINE $203C, 4, kSMPMailerForward, $AA5D;
  470.  
  471. FUNCTION SMPMailerReply(originalLetter: WindowPtr; newLetter: WindowPtr;
  472.     replyToAll: BOOLEAN; upperLeft: Point; canContract: BOOLEAN;
  473.     initiallyExpanded: BOOLEAN; identity: AuthIdentity;
  474.     prepareMailerForDrawingCB: PrepareMailerForDrawingProcPtr;
  475.     clientData: LONGINT): OSErr;
  476.     INLINE $203C, 15, kSMPMailerReply, $AA5D;
  477.  
  478. FUNCTION SMPGetMailerState(window: WindowPtr; VAR itsState: SMPMailerState): OSErr;
  479.     INLINE $203C, 4, kSMPGetMailerState, $AA5D;
  480.  
  481. FUNCTION SMPSendOptionsDialog(window: WindowPtr; documentName: Str255;
  482.     VAR nativeFormatNames: StringPtr; nameCount: INTEGER;
  483.     canSend: SMPSendFormatMask; VAR currentFormat: SMPSendFormat;
  484.     filterProc: SendOptionsFilterProc; clientData: LONGINT;
  485.     VAR shouldSend: SMPSendFormat; sendOptions: SMPSendOptionsPtr): OSErr;
  486.     INLINE $203C, 19, kSMPSendOptionsDialog, $AA5D;
  487.  
  488. FUNCTION SMPPrepareCoverPages(window: WindowPtr; VAR pageCount: INTEGER): OSErr;
  489.     INLINE $203C, 4, kSMPPrepareCoverPages, $AA5D;
  490.  
  491. FUNCTION SMPDrawNthCoverPage(window: WindowPtr; pageNumber: INTEGER;
  492.     doneDrawingCoverPages: BOOLEAN): OSErr;
  493.     INLINE $203C, 4, kSMPDrawNthCoverPage, $AA5D;
  494.  
  495. FUNCTION SMPPrepareToChange(window: WindowPtr): OSErr;
  496.     INLINE $203C, 2, kSMPPrepareToChange, $AA5D;
  497.  
  498. FUNCTION SMPContentChanged(window: WindowPtr): OSErr;
  499.     INLINE $203C, 2, kSMPContentChanged, $AA5D;
  500.  
  501. FUNCTION SMPBeginSave(window: WindowPtr; diskLetter: FSSpec;
  502.     creator: OSType; fileType: OSType; saveType: SMPSaveType;
  503.     VAR mustAddContent: BOOLEAN): OSErr;
  504.     INLINE $203C, 11, kSMPBeginSave, $AA5D;
  505.  
  506. FUNCTION SMPEndSave(window: WindowPtr; okToSave: BOOLEAN): OSErr;
  507.     INLINE $203C, 3, kSMPEndSave, $AA5D;
  508.  
  509. FUNCTION SMPBeginSend(window: WindowPtr; creator: OSType; fileType: OSType;
  510.     sendOptions: SMPSendOptionsPtr; VAR mustAddContent: BOOLEAN): OSErr;
  511.     INLINE $203C, 10, kSMPBeginSend, $AA5D;
  512.  
  513. FUNCTION SMPEndSend(window: WindowPtr; okToSend: BOOLEAN): OSErr;
  514.     INLINE $203C, 3, kSMPEndSend, $AA5D;
  515.  
  516. FUNCTION SMPOpenLetter(letter: LetterDescriptor;
  517.     window: WindowPtr; upperLeft: Point; canContract: BOOLEAN;
  518.     initiallyExpanded: BOOLEAN;
  519.     prepareMailerForDrawingCB: PrepareMailerForDrawingProcPtr;
  520.     clientData: LONGINT): OSErr;
  521.     INLINE $203C, 12, kSMPOpenLetter, $AA5D;
  522.  
  523. FUNCTION SMPAddMainEnclosure(window: WindowPtr; enclosure: FSSpec): OSErr;
  524.     INLINE $203C, 4, kSMPAddMainEnclosure, $AA5D;
  525.  
  526. FUNCTION SMPGetMainEnclosureFSSpec(window: WindowPtr; VAR enclosureDir: FSSpec): OSErr;
  527.     INLINE $203C, 4, kSMPGetMainEnclosureFSSpec, $AA5D;
  528.  
  529. FUNCTION SMPAddContent(window: WindowPtr; segmentType: MailSegmentType;
  530.     appendFlag: BOOLEAN; buffer: UNIV Ptr; bufferSize: LONGINT;
  531.     textScrap: StScrpPtr; startNewScript: BOOLEAN; script: ScriptCode): OSErr;
  532.     INLINE $203C, 12, kSMPAddContent, $AA5D;
  533.  
  534. FUNCTION SMPReadContent(window: WindowPtr; segmentTypeMask: MailSegmentMask;
  535.     buffer: UNIV Ptr; bufferSize: LONGINT; VAR dataSize: LONGINT;
  536.     VAR textScrap: StScrpRec; VAR script: ScriptCode; VAR segmentType: MailSegmentType;
  537.     VAR endOfScript: BOOLEAN; VAR endOfSegment: BOOLEAN; VAR endOfContent: BOOLEAN;
  538.     VAR segmentLength: LONGINT; VAR segmentID: LONGINT): OSErr;
  539.     INLINE $203C, 25, kSMPReadContent, $AA5D;
  540.  
  541. FUNCTION SMPGetFontNameFromLetter(window: WindowPtr; fontNum: INTEGER;
  542.     fontName: Str255; doneWithFontTable: BOOLEAN): OSErr;
  543.     INLINE $203C, 6, kSMPGetFontNameFromLetter, $AA5D;
  544.  
  545. FUNCTION SMPAddBlock(window: WindowPtr; blockType: OCECreatorType;
  546.     append: BOOLEAN; buffer: UNIV Ptr; bufferSize: LONGINT;
  547.     mode: MailBlockMode; offset: LONGINT): OSErr;
  548.     INLINE $203C, 12, kSMPAddBlock, $AA5D;
  549.  
  550. FUNCTION SMPReadBlock(window: WindowPtr; blockType: OCECreatorType;
  551.     blockIndex: INTEGER; buffer: UNIV Ptr; bufferSize: LONGINT;
  552.     dataOffset: LONGINT; VAR dataSize: LONGINT; VAR endOfBlock: BOOLEAN;
  553.     VAR remaining: LONGINT): OSErr;
  554.     INLINE $203C, 17, kSMPReadBlock, $AA5D;
  555.  
  556. FUNCTION SMPEnumerateBlocks(window: WindowPtr; startIndex: INTEGER;
  557.     buffer: UNIV Ptr; bufferSize: LONGINT; VAR dataSize: LONGINT;
  558.     VAR nextIndex: INTEGER; VAR more: BOOLEAN): OSErr;
  559.     INLINE $203C, 13, kSMPEnumerateBlocks, $AA5D;
  560.  
  561. FUNCTION SMPDrawMailer(window: WindowPtr): OSErr;
  562.     INLINE $203C, 2, kSMPDrawMailer, $AA5D;
  563.  
  564.  
  565. FUNCTION SMPSetSubject(window: WindowPtr; text: RString): OSErr;
  566.     INLINE $203C, 4, kSMPSetSubject, $AA5D;
  567.  
  568. FUNCTION SMPSetFromIdentity(window: WindowPtr; from: AuthIdentity): OSErr;
  569.     INLINE $203C, 4, kSMPSetFromIdentity, $AA5D;
  570.  
  571. FUNCTION SMPAddAddress(window: WindowPtr; addrType: SMPAddressType;
  572.     address: OCEPackedRecipientPtr): OSErr;
  573.     INLINE $203C, 5, kSMPAddAddress, $AA5D;
  574.  
  575. FUNCTION SMPAddAttachment(window: WindowPtr; attachment: FSSpec): OSErr;
  576.     INLINE $203C, 4, kSMPAddAttachment, $AA5D;
  577.  
  578. FUNCTION SMPAttachDialog(window: WindowPtr): OSErr;
  579.     INLINE $203C, 2, kSMPAttachDialog, $AA5D;
  580.  
  581.  
  582. FUNCTION SMPExpandOrContract(window: WindowPtr; expand: BOOLEAN): OSErr;
  583.     INLINE $203C, 3, kSMPExpandOrContract, $AA5D;
  584.  
  585.  
  586. FUNCTION SMPMoveMailer(window: WindowPtr; dh: INTEGER; dv: INTEGER): OSErr;
  587.     INLINE $203C, 4, kSMPMoveMailer, $AA5D;
  588.  
  589.  
  590. FUNCTION SMPBecomeTarget(window: WindowPtr; becomeTarget: BOOLEAN;
  591.     whichField: SMPMailerComponent): OSErr;
  592.     INLINE $203C, 5, kSMPBecomeTarget, $AA5D;
  593.  
  594.  
  595. FUNCTION SMPGetComponentSize(window: WindowPtr; whichMailer: INTEGER;
  596.     whichField: SMPMailerComponent; VAR size: INTEGER): OSErr;
  597.     INLINE $203C, 7, kSMPGetComponentSize, $AA5D;
  598.  
  599.  
  600. FUNCTION SMPGetComponentInfo(window: WindowPtr; whichMailer: INTEGER;
  601.     whichField: SMPMailerComponent; buffer: UNIV Ptr): OSErr;
  602.     INLINE $203C, 7, kSMPGetComponentInfo, $AA5D;
  603.  
  604.  
  605. FUNCTION SMPGetListItemInfo(window: WindowPtr; whichMailer: INTEGER;
  606.     whichField: SMPMailerComponent; buffer: UNIV Ptr; bufferLength: LONGINT;
  607.     startItem: INTEGER; VAR itemCount: INTEGER;
  608.     VAR nextItem: INTEGER; VAR more: BOOLEAN): OSErr;
  609.     INLINE $203C, 16, kSMPGetListItemInfo, $AA5D;
  610.  
  611. FUNCTION SMPImage(
  612.     window: WindowPtr; drawImageProc: SMPDrawImageProcPtr;
  613.     imageRefCon: LONGINT; supportsColor: BOOLEAN): OSErr;
  614.     INLINE $203C, 7, kSMPImage, $AA5D;
  615.  
  616. FUNCTION SMPGetNextLetter(VAR typesList: OSType; numTypes: INTEGER;
  617.     VAR adjacentLetter: LetterDescriptor): OSErr;
  618.     INLINE $203C, 5, kSMPGetNextLetter, $AA5D;
  619.  
  620. FUNCTION SMPGetLetterInfo(VAR mailboxSpec: LetterSpec; 
  621.     VAR info: SMPLetterInfo): OSErr;
  622.     INLINE $203C, 4, kSMPGetLetterInfo, $AA5D;
  623.  
  624. {$ENDC}    { UsingOCEStandardMail }
  625.  
  626. {$IFC NOT UsingIncludes}
  627.     END.
  628. {$ENDC}
  629.